<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/src/gui/styles/qmacstyle_mac.cpp -->
<head>
  <title>Qt 4.3: QMacStyle Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">QMacStyle Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1>
<p>The QMacStyle class provides a Mac OS X style using the Apple Appearance Manager. <a href="#details">More...</a></p>
<pre> #include &lt;QMacStyle&gt;</pre><p>Inherits <a href="qwindowsstyle.html">QWindowsStyle</a>.</p>
<ul>
<li><a href="qmacstyle-members.html">List of all members, including inherited members</a></li>
<li><a href="qmacstyle-obsolete.html">Obsolete members</a></li>
</ul>
<a name="public-types"></a>
<h3>Public Types</h3>
<ul>
<li><div class="fn"/>enum <b><a href="qmacstyle.html#FocusRectPolicy-enum">FocusRectPolicy</a></b> { FocusEnabled, FocusDisabled, FocusDefault }</li>
<li><div class="fn"/>enum <b><a href="qmacstyle.html#WidgetSizePolicy-enum">WidgetSizePolicy</a></b> { SizeSmall, SizeLarge, SizeMini, SizeDefault }</li>
</ul>
<a name="public-functions"></a>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"/><b><a href="qmacstyle.html#QMacStyle">QMacStyle</a></b> ()</li>
<li><div class="fn"/>virtual <b><a href="qmacstyle.html#dtor.QMacStyle">~QMacStyle</a></b> ()</li>
</ul>
<ul>
<li><div class="fn"/>23 public functions inherited from <a href="qstyle.html#public-functions">QStyle</a></li>
<li><div class="fn"/>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
<li><div class="fn"/>6 static public members inherited from <a href="qstyle.html#static-public-members">QStyle</a></li>
<li><div class="fn"/>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li><div class="fn"/>2 protected slots inherited from <a href="qstyle.html#protected-slots">QStyle</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QMacStyle class provides a Mac OS X style using the Apple Appearance Manager.</p>
<p>This class is implemented as a wrapper to the HITheme APIs, allowing applications to be styled according to the current theme in use on Mac OS X. This is done by having primitives in <a href="qstyle.html">QStyle</a> implemented in terms of what Mac OS X would normally theme.</p>
<p><b>Warning:</b> This style is only available on Mac OS X because it relies on the HITheme APIs.</p>
<p>There are additional issues that should be taken into consideration to make an application compatible with the <a href="http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/index.html">Apple Human Interface Guidelines</a>. Some of these issues are outlined below.</p>
<ul>
<li>Layout - The restrictions on window layout are such that some aspects of layout that are style-dependent cannot be achieved using <a href="qlayout.html">QLayout</a>. Changes are being considered (and feedback would be appreciated) to make layouts <a href="qstyle.html">QStyle</a>-able. Some of the restrictions involve horizontal and vertical widget alignment and widget size (covered below).</li>
<li>Widget size - Mac OS X allows widgets to have specific fixed sizes. Qt does not fully implement this behavior so as to maintain cross-platform compatibility. As a result some widgets sizes may be inappropriate (and subsequently not rendered correctly by the HITheme APIs).The <a href="qwidget.html#sizeHint-prop">QWidget::sizeHint</a>() will return the appropriate size for many managed widgets (widgets enumerated in <a href="qstyle.html#ContentsType-enum">QStyle::ContentsType</a>).</li>
<li>Effects - QMacStyle uses HITheme for performing most of the drawing, but also uses emulation in a few cases where HITheme does not provide the required functionality (for example, tab bars on Panther, the toolbar separator, etc). We tried to make the emulation as close to the original as possible. Please report any issues you see in effects or non-standard widgets.</li>
</ul>
<p>There are other issues that need to be considered in the feel of your application (including the general color scheme to match the Aqua colors). The Guidelines mentioned above will remain current with new advances and design suggestions for Mac OS X.</p>
<p>Note that the functions provided by QMacStyle are reimplementations of <a href="qstyle.html">QStyle</a> functions; see <a href="qstyle.html">QStyle</a> for their documentation.</p>
<p align="center"><img src="images/qmacstyle.png" /></p><p>See also <a href="qwindowsxpstyle.html">QWindowsXPStyle</a>, <a href="qwindowsstyle.html">QWindowsStyle</a>, <a href="qplastiquestyle.html">QPlastiqueStyle</a>, <a href="qcdestyle.html">QCDEStyle</a>, and <a href="qmotifstyle.html">QMotifStyle</a>.</p>
<hr />
<h2>Member Type Documentation</h2>
<h3 class="fn"><a name="FocusRectPolicy-enum"></a>enum QMacStyle::FocusRectPolicy</h3>
<p>This type is used to signify a widget's focus rectangle policy.</p>
<p><table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QMacStyle::FocusEnabled</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">show a focus rectangle when the widget has focus.</td></tr>
<tr><td valign="top"><tt>QMacStyle::FocusDisabled</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">never show a focus rectangle for the widget.</td></tr>
<tr><td valign="top"><tt>QMacStyle::FocusDefault</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">show a focus rectangle when the widget has focus and the widget is a QSpinWidget, <a href="qdatetimeedit.html">QDateTimeEdit</a>, <a href="qlineedit.html">QLineEdit</a>, <a href="porting4.html#qlistbox">QListBox</a>, <a href="qlistview.html">QListView</a>, editable <a href="qtextedit.html">QTextEdit</a>, or one of their subclasses.</td></tr>
</table></p>
<h3 class="fn"><a name="WidgetSizePolicy-enum"></a>enum QMacStyle::WidgetSizePolicy</h3>
<p><table border="1" cellpadding="2" cellspacing="1" width="40%">
<tr><th width="60%">Constant</th><th width="40%">Value</th></tr>
<tr><td valign="top"><tt>QMacStyle::SizeSmall</tt></td><td align="center" valign="top"><tt>0</tt></td></tr>
<tr><td valign="top"><tt>QMacStyle::SizeLarge</tt></td><td align="center" valign="top"><tt>1</tt></td></tr>
<tr><td valign="top"><tt>QMacStyle::SizeMini</tt></td><td align="center" valign="top"><tt>2</tt></td></tr>
<tr><td valign="top"><tt>QMacStyle::SizeDefault</tt></td><td align="center" valign="top"><tt>3</tt></td></tr>
</table></p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QMacStyle"></a>QMacStyle::QMacStyle ()</h3>
<p>Constructs a <a href="qmacstyle.html">QMacStyle</a> object.</p>
<h3 class="fn"><a name="dtor.QMacStyle"></a>QMacStyle::~QMacStyle ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Destructs a <a href="qmacstyle.html">QMacStyle</a> object.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.5</div></td>
</tr></table></div></address></body>
</html>
